package com.sita.tboard.hitchhike.register;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.sita.bike.R;
import com.sita.tboard.hitchhike.HitchhikeConstants;

import butterknife.ButterKnife;
import butterknife.OnClick;

public class DriverNoRegisteredFragment extends Fragment {

    public DriverNoRegisteredFragment() {
        // Required empty public constructor
    }

    public static DriverNoRegisteredFragment newInstance(String param1, String param2) {
        DriverNoRegisteredFragment fragment = new DriverNoRegisteredFragment();
        Bundle args = new Bundle();
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View v = inflater.inflate(R.layout.fragment_hitchhike_driver_no_registered, container, false);
        ButterKnife.bind(this, v);

        return v;
    }

    @OnClick(R.id.btn_register)
    void onClickBtnRegister(){
        Fragment fragment = getChildFragmentManager().findFragmentByTag(HitchhikeConstants.TAG_DRIVER_REG_FORM);
        if (fragment != null){
            getChildFragmentManager().beginTransaction().show(fragment).commit();
        } else {
            //getChildFragmentManager().beginTransaction().replace()
        }
    }
}
